[java] Trying to use ResourceBundle to fetch messages from external file
Posted
by bumperbox
on Stack Overflow
See other posts from Stack Overflow
or by bumperbox
Published on 2010-04-05T21:24:36Z
Indexed on
2010/04/05
21:33 UTC
Read the original article
Hit count: 363
java
|internationalization
Essentially I would like to have a messages.properties files external to the jar files in my application. So that users can add languages and edit the files easily if my translations are wrong
at the moment i use
ResourceBundle.getBundle("package.MessageBundle");
But i would like to do something like this
ResourceBundle.getBundle("lang/MessageBundle");
Where lang is a folder under my application installation directory.
- is this a good idea (if not, why not)?
- can someone point me in the right direction, or some sample code that does this
thanks
Alex
© Stack Overflow or respective owner